import Vue from 'vue'
import App from './App'
import store from './store'
import bootstrap from './utils/bootstrap.js'
import {
  getPlatform,
  navTo,
  showToast,
  showSuccess,
  showError,
  getShareUrlParams
} from './utils/app'

Vue.config.productionTip = false

// 挂载全局函数
Vue.prototype.$toast = showToast
Vue.prototype.$success = showSuccess
Vue.prototype.$error = showError
Vue.prototype.$navTo = navTo
Vue.prototype.$getShareUrlParams = getShareUrlParams


import uView from '@/uni_modules/uview-ui'
Vue.use(uView)

App.mpType = 'app'

const app = new Vue({
    ...App,
	store,
	created: bootstrap
})
// 引入请求封装，将app参数传递到配置中
require('@/utils/request.js')(app)
app.$mount()
